<?php

$username = $this->input->cookie('user'); 
echo $username;
// $username = isset($this->input->cookie['user']) ? $this->input->cookie('user') : null;

// echo $username; exit();

$data = $this->session->all_userdata();

if(!isset($data['account']['username']))
{
    if($username == '')
    {
        redirect(base_url()."index.php/main_layout");
        exit();    
    }
    
}

if($username == "")
{
    if(!isset($data['account']['username']))
    {
        redirect(base_url()."index.php/main_layout");
        exit(); 
    }
}

?>
<h1>Member area!</h1>


